import axiosApi from "./AxiosApi.js";
// 获取二维码
const getCode = {
  code: {
    url: `/xssc/wxMa/code/getCode`,
    method: "POST"
  },
}
// 实验加样
const addSample = {
  // 分页列表查询
  page: {
    url: `/xssc/experimentSwatch/experimentSummary`,
    method: "GET"
  },
  // 布板+正常样本
  queryNormal: {
    url: `/xssc/experimentSwatch/queryNormal`,
    method: "GET"
  },
  // 布板+复检样本
  queryRecheck: {
    url: `/xssc/experimentSwatch/queryRecheck`,
    method: "GET"
  },
  // 保存
  seave: {
    url: `/xssc/experimentSwatch`,
    method: "POST"
  },
  // 更新
  putData: {
    url: `/xssc/experimentSwatch`,
    method: "PUT"
  }
};

// 实验验收
const acceptanceTesting = {
  // 分页列表查询
  page: {
    url: `/xssc/experimentReceive/selectExpress`,
    method: "POST"
  },
  // 验收
  sampleReceive: {
    url: `/xssc/experimentReceive/sampleReceive`,
    method: "POST"
  },
  // 验收详情
  selectSampleDetail: {
    url: `/xssc/experimentReceive/selectSampleDetail`,
    method: "GET"
  },
  // 实验验收点击导入
  inExpress: {
    url: `/xssc/experimentReceive/inExpress`,
    method: "POST"
  },
  // 列表详情
  getSampleId: {
    url: `/xssc/experimentReceive/getSampleId`,
    method: "GET"
  },
  // 列表详情修改保存
  updSample: {
    url: `/xssc/experimentReceive/updSample`,
    method: "POST"
  },
  // 验收详情-修改项目保存
  updExperiment: {
    url: `/xssc/experimentReceive/updExperiment`,
    method: "POST"
  },
  // 验收详情-修改所属医院保存
  updHospital: {
    url: `/xssc/experimentReceive/updHospital`,
    method: "POST"
  },
  // 扫码验收
  scanReceive: {
    url: `/xssc/experimentReceive/scanReceive`,
    method: "GET"
  },
  // 递送入库
  updFlow: {
    url: `/xssc/experimentReceive/updFlow`,
    method: "POST"
  },
};

// 实验样本查询
const sampleQuery = {
  // 分页列表查询
  page: {
    url: `/xssc/experimentSampleQuery/page`,
    method: "POST"
  },
  // 重编实验编号页面
  sampleList: {
    url: `/xssc/experimentSampleQuery/sampleList`,
    method: "POST"
  },
  // 新实验编号保存
  updExpNum: {
    url: `/xssc/experimentSampleQuery/updateExpNum`,
    method: "POST"
  },
  // 查看报告
  viewReport: {
    url: `/xssc/experimentSampleQuery/viewReport`,
    method: "GET"
  },
  // 查看数据
  viewResult: {
    url: `/xssc/experimentSampleQuery/viewResult`,
    method: "GET"
  },
  // 获取筛查条件
  hintList: {
    url: `/xssc/experimentSampleQuery/hintList`,
    method: "GET"
  },
  // 获取实验指标
  indicatorList: {
    url: `/xssc/experimentSampleQuery/indicatorList`,
    method: "GET"
  },
};

// 数据审核
const dataAudit = {
  // 分页列表查询
  page: {
    url: `/xssc/experimentCheck/page`,
    method: "POST"
  },
  // 审核+展开
  auditView: {
    url: `/xssc/experimentCheck/auditView`,
    method: "GET"
  },
  // 审核+信息
  auditInfo: {
    url: `/xssc/experimentCheck/auditInfo`,
    method: "GET"
  },
  // 审核
  auditSave: {
    url: `/xssc/experimentCheck/auditSave`,
    method: "POST"
  },
  // 删除
  delete: {
    url: `/xssc/experimentCheck`,
    method: "DELETE"
  },
  // 获取布板信息
  querySwatchDetail: {
    url: `/xssc/experimentCheck/querySwatchDetail`,
    method: "GET"
  },
};

// 实验数据
const experimentData = {
  // 查询待合并数据
  page: {
    url: `/xssc/experimentResult/page`,
    method: "POST"
  },
  // 获取实验批次
  queryExperimentSwatch: {
    url: `/xssc/experimentSwatch/queryExperimentSwatch`,
    method: "GET"
  },
  // 同步数据
  sync: {
    url: `/xssc/experimentResult/sync`,
    method: "GET"
  },
  // 查询同步数据
  querySyncResults: {
    url: `/xssc/experimentResult/querySyncResult`,
    method: "GET"
  },
  // 合并结果
  mergeResult: {
    url: `/xssc/experimentResult/mergeResult`,
    method: "POST"
  },
  // 布板+查询已存复检
  querySavedRecheck: {
    url: `/xssc/experimentSwatch/querySavedRecheck`,
    method: "GET"
  },
  // 布板+查询已存初验
  querySavedNormal: {
    url: `/xssc/experimentSwatch/querySavedNormal`,
    method: "GET"
  },
  // 布板+查询已存布板
  querySavedSwatch: {
    url: `/xssc/experimentSwatch/querySavedSwatch`,
    method: "GET"
  },
  // 查询原始实验数据
  queryExperimentData: {
    url: `/xssc/experimentResult/queryExperimentData`,
    method: "POST"
  },
  // 删除
  delete: {
    url: `/xssc/experimentResult`,
    method: "DELETE"
  },
  // 上报
  saveExperimentData: {
    url: `/xssc/experimentResult/saveExperimentData`,
    method: "POST"
  },
  // 统计数据
  queryExperimentDataSummary: {
    url: `/xssc/experimentResult/queryExperimentDataSummary`,
    method: "POST"
  },
  // 点击审核
  submitAudit: {
    url: `/xssc/experimentResult/submitAudit`,
    method: "PUT"
  },
  // 获取编号
  queryExpNumByMinMax: {
    url: `/xssc/experimentSwatch/queryExpNumByMinMax`,
    method: "POST"
  },
};

// 实验批查询
const batchQuery = {
  // 分页列表查询
  page: {
    url: `/xssc/experimentBatchQuery/page`,
    method: "POST"
  },
  // 删除
  delete: {
    url: `/xssc/experimentBatchQuery`,
    method: "DELETE"
  },
  // 打印详情
  experimentSwatchPrint: {
    url: `/xssc/experimentBatchQuery/experimentSwatchPrint`,
    method: "GET"
  },
  // 详情
  getById: {
    url: `/xssc/experimentBatchQuery/detailList`,
    method: "GET"
  }
};

// 结论管理
const verdictManage = {
  // 分页列表查询
  page: {
    url: `/xssc/auditConclusion/page`,
    method: "POST"
  },
  // 同步报告
  synReport: {
    url: `/xssc/auditConclusion/synReport`,
    method: "POST"
  },
  // 结论审核
  conclusionSave: {
    url: `/xssc/auditConclusion/conclusionSave`,
    method: "POST"
  },
  // 结论审核
  auditView: {
    url: `/xssc/auditConclusion/auditView`,
    method: "GET"
  },
  // 结论审核-信息
  auditInfo: {
    url: `/xssc/auditConclusion/auditInfo`,
    method: "GET"
  },
  rollback: {
    url: `/xssc/auditConclusion/rollback`,
    method: "PUT"
  },
}

export default {
  getCode: {
    code(data) {
      return axiosApi({
        ...getCode.code,
        // formData: true,
        data
      });
    },
  },
  addSample: {
    page(data) {
      return axiosApi({
        ...addSample.page,
        // formData: true,
        data
      });
    },
    seave(data) {
      return axiosApi({
        ...addSample.seave,
        // formData: true,
        data
      });
    },
    putData(data) {
      return axiosApi({
        ...addSample.putData,
        // formData: true,
        data
      });
    },
    queryNormal(data) {
      return axiosApi({
        ...addSample.queryNormal,
        // formData: true,
        data
      });
    },
    queryRecheck(data) {
      return axiosApi({
        ...addSample.queryRecheck,
        // formData: true,
        data
      });
    }
  },
  acceptanceTesting: {
    page(data) {
      return axiosApi({
        ...acceptanceTesting.page,
        // formData: true,
        data
      });
    },
    sampleReceive(data) {
      return axiosApi({
        ...acceptanceTesting.sampleReceive,
        // formData: true,
        data
      });
    },
    selectSampleDetail(data) {
      return axiosApi({
        ...acceptanceTesting.selectSampleDetail,
        // formData: true,
        data
      });
    },
    inExpress(data) {
      return axiosApi({
        ...acceptanceTesting.inExpress,
        // formData: true,
        data
      });
    },
    getSampleId(data) {
      return axiosApi({
        ...acceptanceTesting.getSampleId,
        // formData: true,
        data
      });
    },
    updSample(data) {
      return axiosApi({
        ...acceptanceTesting.updSample,
        // formData: true,
        data
      });
    },
    updExperiment(data) {
      return axiosApi({
        ...acceptanceTesting.updExperiment,
        // formData: true,
        data
      });
    },
    updHospital(data) {
      return axiosApi({
        ...acceptanceTesting.updHospital,
        // formData: true,
        data
      });
    },
    scanReceive(data) {
      return axiosApi({
        ...acceptanceTesting.scanReceive,
        // formData: true,
        data
      });
    },
    updFlow(data) {
      return axiosApi({
        ...acceptanceTesting.updFlow,
        // formData: true,
        data
      });
    },
  },
  sampleQuery: {
    page(data) {
      return axiosApi({
        ...sampleQuery.page,
        // formData: true,
        data
      });
    },
    sampleList(data) {
      return axiosApi({
        ...sampleQuery.sampleList,
        // formData: true,
        data
      });
    },
    updExpNum(data) {
      return axiosApi({
        ...sampleQuery.updExpNum,
        // formData: true,
        data
      });
    },
    viewReport(data) {
      return axiosApi({
        ...sampleQuery.viewReport,
        // formData: true,
        data
      });
    },
    viewResult(data) {
      return axiosApi({
        ...sampleQuery.viewResult,
        // formData: true,
        data
      });
    },
    hintList(data) {
      return axiosApi({
        ...sampleQuery.hintList,
        // formData: true,
        data
      });
    },
    indicatorList(data) {
      return axiosApi({
        ...sampleQuery.indicatorList,
        // formData: true,
        data
      });
    },
  },
  dataAudit: {
    page(data) {
      return axiosApi({
        ...dataAudit.page,
        // formData: true,
        data
      });
    },
    auditView(data) {
      return axiosApi({
        ...dataAudit.auditView,
        // formData: true,
        data
      });
    },
    auditInfo(data) {
      return axiosApi({
        ...dataAudit.auditInfo,
        // formData: true,
        data
      });
    },
    auditSave(data) {
      return axiosApi({
        ...dataAudit.auditSave,
        // formData: true,
        data
      });
    },
    delete(data) {
      return axiosApi({
        ...dataAudit.delete,
        // formData: true,
        data
      });
    },
    querySwatchDetail(data) {
      return axiosApi({
        ...dataAudit.querySwatchDetail,
        // formData: true,
        data
      });
    },
    querySwatchDetail(data) {
      return axiosApi({
        url: `/xssc/experimentCheck/querySwatchDetail?id=${data}`,
        method: "GET"
      });
    },
  },
  experimentData: {
    page(data) {
      return axiosApi({
        ...experimentData.page,
        // formData: true,
        data
      });
    },
    queryExperimentSwatch(data) {
      return axiosApi({
        ...experimentData.queryExperimentSwatch,
        // formData: true,
        data
      });
    },
    sync(data) {
      return axiosApi({
        ...experimentData.sync,
        // formData: true,
        data
      });
    },
    querySyncResults(data) {
      return axiosApi({
        ...experimentData.querySyncResults,
        // formData: true,
        data
      });
    },
    mergeResult(data) {
      return axiosApi({
        ...experimentData.mergeResult,
        // formData: true,
        data
      });
    },
    querySavedRecheck(data) {
      return axiosApi({
        ...experimentData.querySavedRecheck,
        // formData: true,
        data
      });
    },
    querySavedNormal(data) {
      return axiosApi({
        ...experimentData.querySavedNormal,
        // formData: true,
        data
      });
    },
    querySavedSwatch(data) {
      return axiosApi({
        ...experimentData.querySavedSwatch,
        // formData: true,
        data
      });
    },
    queryExperimentData(data) {
      return axiosApi({
        ...experimentData.queryExperimentData,
        // formData: true,
        data
      });
    },
    delete(data) {
      return axiosApi({
        ...experimentData.delete,
        // formData: true,
        data
      });
    },
    saveExperimentData(data) {
      return axiosApi({
        ...experimentData.saveExperimentData,
        // formData: true,
        data
      });
    },
    queryExperimentDataSummary(data) {
      return axiosApi({
        ...experimentData.queryExperimentDataSummary,
        // formData: true,
        data
      });
    },
    queryExpNumByMinMax(data) {
      return axiosApi({
        ...experimentData.queryExpNumByMinMax,
        // formData: true,
        data
      });
    },
    interpretation(data) {
      return axiosApi({
        url: `/xssc/experimentResult/interpretation?ids[]=${data}`,
        method: "PUT"
      });
    },
    submitAudit(data) {
      return axiosApi({
        url: `/xssc/experimentResult/submitAudit?id=${data}`,
        method: "PUT"
      });
    },
    cleanExpNum(data) {
      return axiosApi({
        url: `/xssc/experimentResult/cleanExpNum?ids[]=${data}`,
        method: "PUT"
      });
    },
    queryBatchNumberWithMinMax(data) {
      return axiosApi({
        url: `/xssc/experimentSwatch/queryBatchNumberWithMinMax?code=${data}`,
        method: "GET"
      });
    },

  },
  batchQuery: {
    page(data) {
      return axiosApi({
        ...batchQuery.page,
        // formData: true,
        data
      });
    },
    getById(data) {
      return axiosApi({
        ...batchQuery.getById,
        // formData: true,
        data
      });
    },
    delete(data) {
      return axiosApi({
        ...batchQuery.delete,
        // formData: true,
        data
      });
    }
  },
  verdictManage: {
    page(data) {
      return axiosApi({
        ...verdictManage.page,
        // formData: true,
        data
      });
    },
    synReport(data) {
      return axiosApi({
        ...verdictManage.synReport,
        // formData: true,
        data
      });
    },
    conclusionSave(data) {
      return axiosApi({
        ...verdictManage.conclusionSave,
        // formData: true,
        data
      });
    },
    auditView(data) {
      return axiosApi({
        ...verdictManage.auditView,
        // formData: true,
        data
      });
    },
    auditInfo(data) {
      return axiosApi({
        ...verdictManage.auditInfo,
        // formData: true,
        data
      });
    },
    rollback(data) {
      return axiosApi({
        ...verdictManage.rollback,
        // formData: true,
        data
      });
    },
  }
};
